package cloud.server1.controller;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import cloud.server1.api.HelloService2;
import cloud.server1.service.HelloService1;

@RestController
public class HelloController {

	@Autowired
	private HelloService1 helloService1;
	@Autowired
	private HelloService2 helloService2;
    @RequestMapping("/call")
	public List<String> hello(){
    	List<String> list=new ArrayList<>();
    	String ret1=helloService1.hello();
    	String ret2=helloService2.hello();
    	list.add(ret1);
    	list.add(ret2);
    	return list;
	}
}
